<style></style>
<template>
    <div>
        <button @click="click2()">ertyre4324rtyr4324rtgn</button>
    </div>
</template>

<script setup >
import { ref, onMounted, reactive } from 'vue'
import axios from 'axios'

onMounted(() => {

})

function click() {
    axios.post('https://localhost:7069/api/UserTable/Login', {
        username: 'admin',
        password: '123456'
    }, {
        headers: {
            'Content-Type': 'application/json'
        }
    })
        .then(function (response) {
            console.log(response.data);
            sessionStorage.setItem("token", response.data);
        })
}

var info1 = ref({
    "cid": 1003,
    "cname": "甲壳虫",
    "pid": 10
})

function click1() {
    axios({
        url:'https://localhost:7010/api/Values/Post1',
        method:'post',
        data:info1.value
    }).then(function (res) {
        console.log(res.response);
    })
}

function click2() {
    axios({
        url:'https://localhost:7010/api/Values/Get?strName=&name=谢子异',
        method:'get'
    }).then(function (res) {
        console.log(res.response);
    })
}




</script>